#ifndef PROCESS_H
#define PROCESS_H
#include <Windows.h>
#include <vector>
#include "MemoryAlloc.h"

class Process
{
public:
	Process(DWORD processID);
	Process(const char* processName);
	Process(const Process& rhs) = delete;
	Process(Process&& rhs);
	~Process(void);

	Process& operator=(const Process& rhs) = delete;
	Process& operator=(Process&& rhs);
	MemoryAlloc& AllocMemory(DWORD size);
	

	DWORD CallFunction(DWORD(__stdcall*functionAddress)(void*), void* argument);
	void InjectLibrary(const char* libraryPath);
	void InjectModuleRaw(void* moduleBase, DWORD(__stdcall* functionAddress)(void*));

private:
	HANDLE						m_processHandle;
	std::vector<MemoryAlloc>	m_allocs;


	DWORD	GetProcessIdByName(const char* processName);	
};
#endif